Skip to content

[Calls] Replay saved concrete input environments - #617

Open
CaelmBleidd wants to merge 6 commits into
caelmbleidd/calls-concrete-environment-candidatesfrom
caelmbleidd/calls-saved-input-replay
Open

CaelmBleidd wants to merge 6 commits into
caelmbleidd/calls-concrete-environment-candidatesfrom
caelmbleidd/calls-saved-input-replay

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Class probes save concrete input journals, but consuming a saved state still requires a hand-written native wrapper. Add class-replay-input to select one journal state, verify the producing manifest and frozen source/journal hashes, restore its original receiver, arguments and environment, and invoke the original callable through the existing supervised class replayer.

A private AST-checked source overlay supplies exact source-qualified prototypes, static data setters and mutable top-level module setters. Partial environments, inaccessible bindings, unsupported class state and unresolved runtime module boundaries produce explicit unsupported outcomes. Saved-input replay preserves initializer diagnostics; existing lifecycle callers retain their checked-closure default. An unavailable callable is a harness failure before invocation.

The result records actual native completion and return representability separately from the immutable symbolic candidate. Prefix reachability and native class coverage remain a later validation stage, so nativeReplayValidated and nativeCoverageAvailable stay false.

This is a child of #568, based on its verified head 835748c620fb5f4691f7a5432c49995444ed1770.

Validation:

  • Four focused Kotlin/native tests pass with zero failures, errors or skips. Actual saved stopped inputs restore an aliased instance plus static state and return 373; a saved module environment returns 108. Setter controls return 0 and 96, partial environments are rejected, and missing callables remain harness failures.
  • Four focused AST adapter tests pass, including a module binding named value that must not be shadowed by the generated setter. The new tests are included in the standard adapter test command.
  • Calls main/test and fast-check main detekt pass with ignoreFailures=false, without autocorrection; all three SARIF reports have zero findings.

Review the AST eligibility rules, then saved-state identity/restoration and the source/native regression fixtures. Full suites are left to CI.

Fixture validation follow-up: reuse the existing deterministic tests from #582 (boxed registry identity with explicit branch domains) and #593 (untyped coercion through bounded numeric/boolean callers). Their original patches also occur in #578; integrate each once and drop duplicate commits when rebasing the stack. This changes test domains, not the experiment runtime or model coverage results.
The JDK11 Stream.toList compilation error is fixed. 34 replay/smoke tests, the registry oracle suite, and the TypeCoercion tests passed locally; Calls Detekt main/test passed. Fresh PR-head CI is required after the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant